/**
 * @file _axiom-resource-view.scss
 * @description AxiomResourceView 组件样式
 */

.axiom-resource-view {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: var(--axiom-spacing-lg, 16px);
}

.scroll-container {
  flex: 1;
  overflow-y: auto;
  padding: var(--axiom-spacing-xs, 4px);
}

/* Generic Card Styles */
.axiom-resource-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  min-height: var(--axiom-resource-card-min-height, 200px);
  border: 1px solid var(--border-color);
  transition: var(--axiom-transition-base);
  
  &:hover {
    transform: translateY(var(--axiom-resource-card-hover-translate-y, -4px));
    box-shadow: var(--axiom-shadow-dark);
    border-color: var(--primary-color);
  }
}

.axiom-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--axiom-spacing-lg, 16px);
  
  .axiom-card-title {
    font-size: 1.1em;
    color: var(--text-color);
    font-weight: 600;
    line-height: 1.4;
    word-break: break-word;
    flex: 1;
    margin-right: var(--axiom-spacing-md, 12px);
  }
  
  .axiom-card-subtitle {
    background: linear-gradient(135deg, var(--primary-color-light), var(--primary-color));
    color: var(--text-color-on-primary);
    padding: var(--axiom-spacing-xs, 4px) var(--axiom-spacing-md, 12px);
    border-radius: var(--axiom-border-radius-pill, 12px);
    font-size: 0.75em;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
  }
}

.axiom-card-body {
  flex: 1;
  margin-bottom: var(--axiom-spacing-lg, 16px);
  
  .axiom-card-description {
    margin-bottom: var(--axiom-spacing-md, 12px);
    line-height: 1.6;
    min-height: var(--axiom-resource-card-desc-min-height, 48px);
    color: var(--text-color-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  
  .axiom-card-meta {
    margin-top: var(--axiom-spacing-md, 12px);
    padding: var(--axiom-spacing-sm, 8px) var(--axiom-spacing-md, 12px);
    background-color: var(--bg-color-soft);
    border-radius: var(--axiom-border-radius-large, 8px);
    border-left: var(--axiom-resource-card-meta-border-width, 3px) solid var(--primary-color);
  }
}

.axiom-card-footer {
  margin-top: auto;
  padding-top: var(--axiom-spacing-md, 12px);
  border-top: 1px solid var(--border-color-soft);

  .axiom-status-badge {
    display: inline-block;
    padding: var(--axiom-spacing-xs, 4px) 10px;
    border-radius: var(--axiom-border-radius-pill, 12px);
    font-size: 0.8em;
    font-weight: 600;
    
    &.tunable {
      background-color: var(--c-success-soft);
      color: var(--c-success-dark);
    }
    
    &.not-tunable {
      background-color: var(--c-info-soft);
      color: var(--c-info-dark);
    }
  }
}

/* Layout Styles */
.axiom-grid-layout {
  display: grid;
  gap: var(--axiom-spacing-xl, 20px);
  padding: var(--axiom-spacing-sm, 8px);
}

.axiom-list-layout {
  display: flex;
  flex-direction: column;
  gap: var(--axiom-spacing-lg, 16px);
}

/* Responsive Grid Columns */
@media (min-width: 640px) {
  .axiom-grid-cols-sm-1 { grid-template-columns: repeat(1, 1fr); }
  .axiom-grid-cols-sm-2 { grid-template-columns: repeat(2, 1fr); }
  .axiom-grid-cols-sm-3 { grid-template-columns: repeat(3, 1fr); }
  .axiom-grid-cols-sm-4 { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 768px) {
  .axiom-grid-cols-md-1 { grid-template-columns: repeat(1, 1fr); }
  .axiom-grid-cols-md-2 { grid-template-columns: repeat(2, 1fr); }
  .axiom-grid-cols-md-3 { grid-template-columns: repeat(3, 1fr); }
  .axiom-grid-cols-md-4 { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1024px) {
  .axiom-grid-cols-lg-1 { grid-template-columns: repeat(1, 1fr); }
  .axiom-grid-cols-lg-2 { grid-template-columns: repeat(2, 1fr); }
  .axiom-grid-cols-lg-3 { grid-template-columns: repeat(3, 1fr); }
  .axiom-grid-cols-lg-4 { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1280px) {
  .axiom-grid-cols-xl-1 { grid-template-columns: repeat(1, 1fr); }
  .axiom-grid-cols-xl-2 { grid-template-columns: repeat(2, 1fr); }
  .axiom-grid-cols-xl-3 { grid-template-columns: repeat(3, 1fr); }
  .axiom-grid-cols-xl-4 { grid-template-columns: repeat(4, 1fr); }
  .axiom-grid-cols-xl-5 { grid-template-columns: repeat(5, 1fr); }
}

/* State Containers */
.axiom-state-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--axiom-spacing-lg, 16px);
  padding: var(--axiom-resource-state-container-padding-y, 48px) var(--axiom-spacing-xl, 24px);
  text-align: center;
  min-height: var(--axiom-resource-card-min-height, 200px);
} 